From bc53d8d686034925e6b067fb543e7f0657c416fe Mon Sep 17 00:00:00 2001 From: Drew Parsons Date: Fri, 8 May 2026 14:40:24 +0200 Subject: [PATCH] add debian patch gdal-3.13.patch enables build with gdal 3.13. Thanks Bas Couwenberg. Closes: #1134162 --- debian/changelog | 2 ++ debian/patches/gdal-3.13.patch | 35 ++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 38 insertions(+) create mode 100644 debian/patches/gdal-3.13.patch diff --git a/debian/changelog b/debian/changelog index a0542dbf0..e1e980946 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ vtk9 (9.5.2+dfsg4-4) UNRELEASED; urgency=medium endianness, int size, etc). Closes: #1133759 Consequently drop Multi-Arch: same from libvtk9-qt-dev to avoid including inconsistent header definitions + * debian patch gdal-3.13.patch enables build with gdal 3.13. + Thanks Bas Couwenberg. Closes: #1134162 -- Drew Parsons Thu, 07 May 2026 00:29:41 +0200 diff --git a/debian/patches/gdal-3.13.patch b/debian/patches/gdal-3.13.patch new file mode 100644 index 000000000..51ee6860e --- /dev/null +++ b/debian/patches/gdal-3.13.patch @@ -0,0 +1,35 @@ +Description: Fix FTBFS with GDAL 3.13.0. + error: invalid conversion from 'CSLConstList' {aka 'const char* const*'} to 'char**' [-fpermissive] + . + From GDAL 3.13.0 NEWS: + " + * GDALMajorObject: Use CSLConstList for GetMetadata, SetMetadata (API breakage) + " +Author: Bas Couwenberg + +--- a/IO/GDAL/vtkGDALRasterReader.cxx ++++ b/IO/GDAL/vtkGDALRasterReader.cxx +@@ -182,7 +182,11 @@ void vtkGDALRasterReader::vtkGDALRasterR + this->Reader->DriverShortName = GDALGetDriverShortName(driver); + this->Reader->DriverLongName = GDALGetDriverLongName(driver); + ++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0) ++ CSLConstList papszMetaData = GDALGetMetadata(this->GDALData, nullptr); ++#else + char** papszMetaData = GDALGetMetadata(this->GDALData, nullptr); ++#endif + if (CSLCount(papszMetaData) > 0) + { + for (int i = 0; papszMetaData[i] != nullptr; ++i) +@@ -878,7 +882,11 @@ std::vector vtkGDALRasterRe + { + std::vector domainMetaData; + ++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0) ++ CSLConstList papszMetadata = GDALGetMetadata(this->Impl->GDALData, domain.c_str()); ++#else + char** papszMetadata = GDALGetMetadata(this->Impl->GDALData, domain.c_str()); ++#endif + + if (CSLCount(papszMetadata) > 0) + { diff --git a/debian/patches/series b/debian/patches/series index e6c09e9e6..a1f79c59e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -13,3 +13,4 @@ 121_add_support_for_loong64.patch findEXPAT_version_fix_MR12826.patch matplotlib_nullptr_s390x.patch +gdal-3.13.patch -- 2.30.2